using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NalaController : MonoBehaviour
{
    public GameObject dialog;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {

    }

    void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.name == Defines.MainCharacterName)
        {
            var currentQuest = QuestSystem.Instance.CurrentQuest;
            if (currentQuest.Giver == Defines.Nala 
                && currentQuest.Status != QuestStatus.Inactive 
                && currentQuest.Status != QuestStatus.Archived)
            {
                dialog.GetComponent<DialogController>().ShowDialog();
            }
        }
    }
}
